﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace jnagr.Web
{
    public partial class agr : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (Session["user"] != null)
            //{
            //    getlogininfo();
            //}
            //else
            //{
            //    Response.Redirect("~/jump.html");
            //}

        }
        private void getlogininfo()
        {           
            string umenu = getMenu();
            if (!umenu.Contains("01"))
            {
                Panel1.Visible = false;
            }
            if (!umenu.Contains("02"))
            {
                Panel2.Visible = false;
            }
            if (!umenu.Contains("03"))
            {
                Panel3.Visible = false;
            }
            if (!umenu.Contains("04"))
            {
                Panel4.Visible = false;
            }
            if (!umenu.Contains("05"))
            {
                Panel5.Visible = false;
            }
            if (!umenu.Contains("06"))
            {
                Panel6.Visible = false;
            }
            if (!umenu.Contains("07"))
            {
                Panel7.Visible = false;
            }
        }
        public string getMenu()
        {
            string umenu = "";
            DataTable dt = Session["user"] as DataTable;
            if (dt != null)
            {
                umenu = dt.Rows[0]["umenu"].ToString();
            }

            return umenu;
        }
    }
}